//
//  ViewController.m
//  AssociatedTest
//
//  Created by 崔宝印 on 2018/5/3.
//  Copyright © 2018年 Koolearn. All rights reserved.
//

#import "ViewController.h"
#import "UIButton+Associated.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [self testBtn];
}

- (void)testBtn
{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setTitle:@"测试点击" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [btn setFrame:CGRectMake(100, 100, 100, 50)];
    [self.view addSubview:btn];
    [btn setButtonClicked:^(UIButton *btn) {
        NSLog(@"button点击一次");
    }];
}
@end
